
<?php include "header.php";?>
	<div id="all">
		<?php
		if($lang == 0){
				$sqlArticle = "Select id, vi_title as title, vi_content as content,vi_summary as summary from tblarticle where section_id =" .$section_id; 
			}else{
				$sqlArticle = "Select id, en_title as title, en_content as content,en_summary as summary from tblarticle where section_id =" .$section_id; 
			}
			$rsArticles = mysql_query($sqlArticle) or die(mysql_error);
		
		?>
        <style type="text/css">
       .container ul li p.readmore {
    padding-right: 20px;
    text-align: right;
		}
	.container  ul li p.readmore a {
    background: url("../images/bullet.png") no-repeat scroll left center transparent;
    color: #FFA200;
    padding-left: 15px;
}
.container ul li a {
    background: url("../images/bullet1.png") no-repeat scroll left center transparent;
    color: #1745A2;
    font-weight: bold;
    margin-top: 10px;
    padding-left: 10px;
}
        </style>
		<div id="main">
			<div id="m-left">
				<div class="sidebar">
					<div class="title">
						<?php echo ($lang ==0)? "Danh mục" : "Menu";?>
					</div>
					<div class="b-container">
						<ul>
						<?php
							if($lang == 0){
								$sqlMenus = "select id, vi_name as name, url from tblmenu where parent_id =0";
							} else{
								$sqlMenus = "select id, en_name as name, url from tblmenu where parent_id =0";
							}
							$rsMenus = mysql_query($sqlMenus) or die(mysql_error());
							while($menu = mysql_fetch_object($rsMenus)){
								echo "<li><a href='".(($menu->url =="")? (ROOT_PATH."/m/".$menu->id) : ROOT_PATH.$menu->url)."'>".$menu->name."</a></li>";
							}
						?>
						</ul>
					</div>
				</div><!-- end of sidebar -->
			</div>
			<div id="m-mid">
				<div class="title">
					<?php
						if($lang == 0){
							echo "Chuyên muc";
						}else{
							echo "Section";
						}
					?>
				</div>
				<div class="content">
					<ul>
						<?php 
						while($article = mysql_fetch_object($rsArticles)){
							?>
							<li>
								<a href="<?php echo ROOT_PATH;?>/view/<?php echo $article->id;?>"><?php echo $article->title;?></a>
								<p class="summary">
									<?php echo $article->summary."...";?>
								</p>
								<p class="readmore">
									<a href="<?php echo ROOT_PATH;?>/view/<?php echo $article->id;?>">Xem tiếp</a>
								</p>
							</li>
                       <?php
						}?>
					</ul>
					
				</div>
			</div>
			<div id="m-right">
			
				<div class="sidebar">
					<?php include "newest.php";?>
				</div><!-- end of sidebar -->
			</div>
			<div class="clear-fix"></div>
		</div><!--  end of main -->
		<?php include "footer.php";?>
	</div>
</body>
</html>